#pragma once
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/ui/text/TextTestRunner.h>
#include <cppunit/extensions/HelperMacros.h>
#include "MyString.h"

class MyStringTest :
	public CppUnit::TestCase
{
public:
	void checkLength() {
		MyString s;
		CPPUNIT_ASSERT_MESSAGE("String Length Non-Zero", s.size() == 0);
	}

	void checkValue() {
		MyString s;
		s.setbuffer("hello world!\n");
		CPPUNIT_ASSERT_EQUAL_MESSAGE("Corrupt String Data", s[0], 'w');
	}

	CPPUNIT_TEST_SUITE( MyStringTest );
	CPPUNIT_TEST( checkLength );
	CPPUNIT_TEST( checkValue );
	CPPUNIT_TEST_SUITE_END();
};
